package neves.android.etmg.tilemap.mapcreater;

import android.util.Log;
import neves.android.etmg.map.MapCreater;
import neves.android.etmg.tilemap.TileMap;

public class TileMapCreater_TwoBigRoom extends TileMapCreater {

	/*
	 * (non-Javadoc)
	 * 
	 * @see neves.android.etmg.MapCreater#CreateMap(neves.android.etmg.TileMap)
	 */
	public TileMap CreateMap() {

		targetMap = new TileMap(128, 128);

		// {roomX,roomY,roomWidth,roomHeight,isCreated}
		int[][] roomData = new int[2][5];

		int[] room_A_size = RandomARoomSize(10, 40);
		int[] room_B_size = RandomARoomSize(10, 40);
		int[] room_Distance = new int[2];// RandomARoomSize(1,20);

		room_Distance[0] = RandomNumber(3, 15);
		room_Distance[1] = RandomNumberSigned(0, 20);

		roomData[0][0] = 40; // roomA px
		roomData[0][1] = 40; // roomA py
		roomData[0][2] = room_A_size[0]; // roomA width
		roomData[0][3] = room_A_size[1]; // roomA height

		roomData[1][0] = roomData[0][0] + room_A_size[0] + room_Distance[0]; // roomB
																				// px
		roomData[1][1] = roomData[0][1] + room_Distance[1]; // roomB py
		roomData[1][2] = room_B_size[0]; // roomA width
		roomData[1][3] = room_B_size[1]; // roomA height

		roomData[0][4] = (targetMap.MakeARoom(roomData[0][0], roomData[0][1],
				roomData[0][2], roomData[0][3]) ? 0 : 1);
		roomData[1][4] = (targetMap.MakeARoom(roomData[1][0], roomData[1][1],
				roomData[1][2], roomData[1][3]) ? 0 : 1);


		ConnectTwoRoom(roomData[0],roomData[1]);
		// Log.w("ETMG",
	
		
		return targetMap;
	}



}
